\(\int \frac {1}{\sqrt {-3-4 x-x^2} (3+4 x+2 x^2)} \, dx\) [130]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [B] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 27, antiderivative size = 95 \[ \int \frac {1}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx=-\frac {1}{3} \sqrt {2} \arctan \left (\frac {1-\frac {3+x}{\sqrt {-3-4 x-x^2}}}{\sqrt {2}}\right )+\frac {1}{3} \sqrt {2} \arctan \left (\frac {1+\frac {3+x}{\sqrt {-3-4 x-x^2}}}{\sqrt {2}}\right )+\frac {1}{3} \text {arctanh}\left (\frac {x}{\sqrt {-3-4 x-x^2}}\right ) \]

[Out]

1/3*arctanh(x/(-x^2-4*x-3)^(1/2))-1/3*arctan(1/2*(1+(-3-x)/(-x^2-4*x-3)^(1/2))*2^(1/2))*2^(1/2)+1/3*arctan(1/2
*(1+(3+x)/(-x^2-4*x-3)^(1/2))*2^(1/2))*2^(1/2)

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.296, Rules used = {1000, 12, 1040, 1175, 632, 210, 1041, 212} \[ \int \frac {1}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx=-\frac {1}{3} \sqrt {2} \arctan \left (\frac {1-\frac {x+3}{\sqrt {-x^2-4 x-3}}}{\sqrt {2}}\right )+\frac {1}{3} \sqrt {2} \arctan \left (\frac {\frac {x+3}{\sqrt {-x^2-4 x-3}}+1}{\sqrt {2}}\right )+\frac {1}{3} \text {arctanh}\left (\frac {x}{\sqrt {-x^2-4 x-3}}\right ) \]

[In]

Int[1/(Sqrt[-3 - 4*x - x^2]*(3 + 4*x + 2*x^2)),x]

[Out]

-1/3*(Sqrt[2]*ArcTan[(1 - (3 + x)/Sqrt[-3 - 4*x - x^2])/Sqrt[2]]) + (Sqrt[2]*ArcTan[(1 + (3 + x)/Sqrt[-3 - 4*x
 - x^2])/Sqrt[2]])/3 + ArcTanh[x/Sqrt[-3 - 4*x - x^2]]/3

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 210

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^(-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])
], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 632

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 1000

Int[1/(((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Symbol] :> With[{q = Rt
[(c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f), 2]}, Dist[1/(2*q), Int[(c*d - a*f + q + (c*e - b*f)*x)/((a + b*x + c
*x^2)*Sqrt[d + e*x + f*x^2]), x], x] - Dist[1/(2*q), Int[(c*d - a*f - q + (c*e - b*f)*x)/((a + b*x + c*x^2)*Sq
rt[d + e*x + f*x^2]), x], x]] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[e^2 - 4*d*f, 0] &&
 NeQ[c*e - b*f, 0] && NegQ[b^2 - 4*a*c]

Rule 1040

Int[(x_)/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Symbol] :> Dist[-2*e,
Subst[Int[(1 - d*x^2)/(c*e - b*f - e*(2*c*d - b*e + 2*a*f)*x^2 + d^2*(c*e - b*f)*x^4), x], x, (1 + (e + Sqrt[e
^2 - 4*d*f])*(x/(2*d)))/Sqrt[d + e*x + f*x^2]], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b^2 - 4*a*c, 0] && N
eQ[e^2 - 4*d*f, 0] && EqQ[b*d - a*e, 0]

Rule 1041

Int[((g_) + (h_.)*(x_))/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Symbol]
 :> Dist[g, Subst[Int[1/(a + (c*d - a*f)*x^2), x], x, x/Sqrt[d + e*x + f*x^2]], x] /; FreeQ[{a, b, c, d, e, f,
 g, h}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[e^2 - 4*d*f, 0] && EqQ[b*d - a*e, 0] && EqQ[2*h*d - g*e, 0]

Rule 1175

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[2*(d/e) - b/c, 2]},
Dist[e/(2*c), Int[1/Simp[d/e + q*x + x^2, x], x], x] + Dist[e/(2*c), Int[1/Simp[d/e - q*x + x^2, x], x], x]] /
; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - a*e^2, 0] && (GtQ[2*(d/e) - b/c, 0] || ( !Lt
Q[2*(d/e) - b/c, 0] && EqQ[d - e*Rt[a/c, 2], 0]))

Rubi steps \begin{align*} \text {integral}& = -\left (\frac {1}{6} \int \frac {-6-4 x}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx\right )+\frac {1}{6} \int -\frac {4 x}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx \\ & = -\left (\frac {2}{3} \int \frac {x}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx\right )+\text {Subst}\left (\int \frac {1}{3-3 x^2} \, dx,x,\frac {x}{\sqrt {-3-4 x-x^2}}\right ) \\ & = \frac {1}{3} \tanh ^{-1}\left (\frac {x}{\sqrt {-3-4 x-x^2}}\right )-\frac {16}{3} \text {Subst}\left (\int \frac {1+3 x^2}{-4-8 x^2-36 x^4} \, dx,x,\frac {1+\frac {x}{3}}{\sqrt {-3-4 x-x^2}}\right ) \\ & = \frac {1}{3} \tanh ^{-1}\left (\frac {x}{\sqrt {-3-4 x-x^2}}\right )+\frac {2}{9} \text {Subst}\left (\int \frac {1}{\frac {1}{3}-\frac {2 x}{3}+x^2} \, dx,x,\frac {1+\frac {x}{3}}{\sqrt {-3-4 x-x^2}}\right )+\frac {2}{9} \text {Subst}\left (\int \frac {1}{\frac {1}{3}+\frac {2 x}{3}+x^2} \, dx,x,\frac {1+\frac {x}{3}}{\sqrt {-3-4 x-x^2}}\right ) \\ & = \frac {1}{3} \tanh ^{-1}\left (\frac {x}{\sqrt {-3-4 x-x^2}}\right )-\frac {4}{9} \text {Subst}\left (\int \frac {1}{-\frac {8}{9}-x^2} \, dx,x,\frac {2}{3} \left (-1+\frac {3+x}{\sqrt {-3-4 x-x^2}}\right )\right )-\frac {4}{9} \text {Subst}\left (\int \frac {1}{-\frac {8}{9}-x^2} \, dx,x,\frac {2}{3} \left (1+\frac {3+x}{\sqrt {-3-4 x-x^2}}\right )\right ) \\ & = -\frac {1}{3} \sqrt {2} \tan ^{-1}\left (\frac {1-\frac {3+x}{\sqrt {-3-4 x-x^2}}}{\sqrt {2}}\right )+\frac {1}{3} \sqrt {2} \tan ^{-1}\left (\frac {1+\frac {3+x}{\sqrt {-3-4 x-x^2}}}{\sqrt {2}}\right )+\frac {1}{3} \tanh ^{-1}\left (\frac {x}{\sqrt {-3-4 x-x^2}}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.15 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.57 \[ \int \frac {1}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx=\frac {1}{3} \left (\sqrt {2} \arctan \left (\frac {3+2 x}{\sqrt {2} \sqrt {-3-4 x-x^2}}\right )+\text {arctanh}\left (\frac {x}{\sqrt {-3-4 x-x^2}}\right )\right ) \]

[In]

Integrate[1/(Sqrt[-3 - 4*x - x^2]*(3 + 4*x + 2*x^2)),x]

[Out]

(Sqrt[2]*ArcTan[(3 + 2*x)/(Sqrt[2]*Sqrt[-3 - 4*x - x^2])] + ArcTanh[x/Sqrt[-3 - 4*x - x^2]])/3

Maple [A] (verified)

Time = 0.68 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.27

method result size
default \(-\frac {\sqrt {3}\, \sqrt {4}\, \sqrt {\frac {3 x^{2}}{\left (-\frac {3}{2}-x \right )^{2}}-12}\, \left (\sqrt {2}\, \arctan \left (\frac {\sqrt {\frac {3 x^{2}}{\left (-\frac {3}{2}-x \right )^{2}}-12}\, \sqrt {2}}{6}\right )+\operatorname {arctanh}\left (\frac {3 x}{\left (-\frac {3}{2}-x \right ) \sqrt {\frac {3 x^{2}}{\left (-\frac {3}{2}-x \right )^{2}}-12}}\right )\right )}{18 \sqrt {\frac {\frac {x^{2}}{\left (-\frac {3}{2}-x \right )^{2}}-4}{\left (1+\frac {x}{-\frac {3}{2}-x}\right )^{2}}}\, \left (1+\frac {x}{-\frac {3}{2}-x}\right )}\) \(121\)
trager \(\frac {\ln \left (\frac {36 \operatorname {RootOf}\left (12 \textit {\_Z}^{2}-4 \textit {\_Z} +1\right )^{2} x -36 \operatorname {RootOf}\left (12 \textit {\_Z}^{2}-4 \textit {\_Z} +1\right ) x -36 \operatorname {RootOf}\left (12 \textit {\_Z}^{2}-4 \textit {\_Z} +1\right )-6 \sqrt {-x^{2}-4 x -3}+5 x +6}{6 \operatorname {RootOf}\left (12 \textit {\_Z}^{2}-4 \textit {\_Z} +1\right ) x +x +3}\right )}{3}-\ln \left (\frac {36 \operatorname {RootOf}\left (12 \textit {\_Z}^{2}-4 \textit {\_Z} +1\right )^{2} x -36 \operatorname {RootOf}\left (12 \textit {\_Z}^{2}-4 \textit {\_Z} +1\right ) x -36 \operatorname {RootOf}\left (12 \textit {\_Z}^{2}-4 \textit {\_Z} +1\right )-6 \sqrt {-x^{2}-4 x -3}+5 x +6}{6 \operatorname {RootOf}\left (12 \textit {\_Z}^{2}-4 \textit {\_Z} +1\right ) x +x +3}\right ) \operatorname {RootOf}\left (12 \textit {\_Z}^{2}-4 \textit {\_Z} +1\right )+\operatorname {RootOf}\left (12 \textit {\_Z}^{2}-4 \textit {\_Z} +1\right ) \ln \left (\frac {12 \operatorname {RootOf}\left (12 \textit {\_Z}^{2}-4 \textit {\_Z} +1\right )^{2} x +4 \operatorname {RootOf}\left (12 \textit {\_Z}^{2}-4 \textit {\_Z} +1\right ) x +12 \operatorname {RootOf}\left (12 \textit {\_Z}^{2}-4 \textit {\_Z} +1\right )-2 \sqrt {-x^{2}-4 x -3}-x -2}{2 \operatorname {RootOf}\left (12 \textit {\_Z}^{2}-4 \textit {\_Z} +1\right ) x -x -1}\right )\) \(280\)

[In]

int(1/(2*x^2+4*x+3)/(-x^2-4*x-3)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/18*3^(1/2)*4^(1/2)*(3*x^2/(-3/2-x)^2-12)^(1/2)*(2^(1/2)*arctan(1/6*(3*x^2/(-3/2-x)^2-12)^(1/2)*2^(1/2))+arc
tanh(3*x/(-3/2-x)/(3*x^2/(-3/2-x)^2-12)^(1/2)))/((x^2/(-3/2-x)^2-4)/(1+x/(-3/2-x))^2)^(1/2)/(1+x/(-3/2-x))

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 132, normalized size of antiderivative = 1.39 \[ \int \frac {1}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx=-\frac {1}{6} \, \sqrt {2} \arctan \left (\frac {\sqrt {2} x + 3 \, \sqrt {2} \sqrt {-x^{2} - 4 \, x - 3}}{2 \, {\left (2 \, x + 3\right )}}\right ) - \frac {1}{6} \, \sqrt {2} \arctan \left (-\frac {\sqrt {2} x - 3 \, \sqrt {2} \sqrt {-x^{2} - 4 \, x - 3}}{2 \, {\left (2 \, x + 3\right )}}\right ) - \frac {1}{12} \, \log \left (-\frac {2 \, \sqrt {-x^{2} - 4 \, x - 3} x + 4 \, x + 3}{x^{2}}\right ) + \frac {1}{12} \, \log \left (\frac {2 \, \sqrt {-x^{2} - 4 \, x - 3} x - 4 \, x - 3}{x^{2}}\right ) \]

[In]

integrate(1/(2*x^2+4*x+3)/(-x^2-4*x-3)^(1/2),x, algorithm="fricas")

[Out]

-1/6*sqrt(2)*arctan(1/2*(sqrt(2)*x + 3*sqrt(2)*sqrt(-x^2 - 4*x - 3))/(2*x + 3)) - 1/6*sqrt(2)*arctan(-1/2*(sqr
t(2)*x - 3*sqrt(2)*sqrt(-x^2 - 4*x - 3))/(2*x + 3)) - 1/12*log(-(2*sqrt(-x^2 - 4*x - 3)*x + 4*x + 3)/x^2) + 1/
12*log((2*sqrt(-x^2 - 4*x - 3)*x - 4*x - 3)/x^2)

Sympy [F]

\[ \int \frac {1}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx=\int \frac {1}{\sqrt {- \left (x + 1\right ) \left (x + 3\right )} \left (2 x^{2} + 4 x + 3\right )}\, dx \]

[In]

integrate(1/(2*x**2+4*x+3)/(-x**2-4*x-3)**(1/2),x)

[Out]

Integral(1/(sqrt(-(x + 1)*(x + 3))*(2*x**2 + 4*x + 3)), x)

Maxima [F]

\[ \int \frac {1}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx=\int { \frac {1}{{\left (2 \, x^{2} + 4 \, x + 3\right )} \sqrt {-x^{2} - 4 \, x - 3}} \,d x } \]

[In]

integrate(1/(2*x^2+4*x+3)/(-x^2-4*x-3)^(1/2),x, algorithm="maxima")

[Out]

integrate(1/((2*x^2 + 4*x + 3)*sqrt(-x^2 - 4*x - 3)), x)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 165 vs. \(2 (76) = 152\).

Time = 0.29 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.74 \[ \int \frac {1}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx=-\frac {1}{3} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\frac {3 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + 1\right )}\right ) - \frac {1}{3} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\frac {\sqrt {-x^{2} - 4 \, x - 3} - 1}{x + 2} + 1\right )}\right ) + \frac {1}{6} \, \log \left (\frac {2 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + \frac {3 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}^{2}}{{\left (x + 2\right )}^{2}} + 1\right ) - \frac {1}{6} \, \log \left (\frac {2 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + \frac {{\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}^{2}}{{\left (x + 2\right )}^{2}} + 3\right ) \]

[In]

integrate(1/(2*x^2+4*x+3)/(-x^2-4*x-3)^(1/2),x, algorithm="giac")

[Out]

-1/3*sqrt(2)*arctan(1/2*sqrt(2)*(3*(sqrt(-x^2 - 4*x - 3) - 1)/(x + 2) + 1)) - 1/3*sqrt(2)*arctan(1/2*sqrt(2)*(
(sqrt(-x^2 - 4*x - 3) - 1)/(x + 2) + 1)) + 1/6*log(2*(sqrt(-x^2 - 4*x - 3) - 1)/(x + 2) + 3*(sqrt(-x^2 - 4*x -
 3) - 1)^2/(x + 2)^2 + 1) - 1/6*log(2*(sqrt(-x^2 - 4*x - 3) - 1)/(x + 2) + (sqrt(-x^2 - 4*x - 3) - 1)^2/(x + 2
)^2 + 3)

Mupad [F(-1)]

Timed out. \[ \int \frac {1}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx=\int \frac {1}{\sqrt {-x^2-4\,x-3}\,\left (2\,x^2+4\,x+3\right )} \,d x \]

[In]

int(1/((- 4*x - x^2 - 3)^(1/2)*(4*x + 2*x^2 + 3)),x)

[Out]

int(1/((- 4*x - x^2 - 3)^(1/2)*(4*x + 2*x^2 + 3)), x)